﻿using System.Collections.Generic;
using System.Diagnostics;
using System.ServiceModel.Channels;
using Acr.XamForms.UserDialogs;
using Xamarin;
using Xamarin.Forms;
using XLabs.Forms.Mvvm;

namespace HalalCheck.ViewModels
{
    public class BaseViewModel :ViewModel
    {
        private IUserDialogService _dialogs;

        public override void OnViewAppearing()
        {
            base.OnViewAppearing();
            Insights.Track("OnViewAppearing", new Dictionary<string, string> { { "OnViewAppearing", GetType().Name }, });
        }

        protected BaseViewModel()
        {
            Dialogs=DependencyService.Get<IUserDialogService>();
        }

        public virtual void OnAppearing()
        {
      
        }

        public IUserDialogService Dialogs
        {
            get { return _dialogs; }
            set
            {
                _dialogs = value;
                NotifyPropertyChanged();
            }
            
        }

      
    }
}